package com.mrjoew.weekend.web.propertiesapi;

import com.mrjoew.weekend.entities.po.PropertiesCarouselPO;
import com.mrjoew.weekend.services.bz.PropertiesCarouselService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Christopher Jones
 * @ClassName CarouselApiController
 * @explain
 * @date 2020/6/19 0019 11:13
 */
@Api(tags = "轮播图")
@RequestMapping(value = "/papi/carousel")
@RestController
public class PropertiesCarouselApiController {

    @Autowired
    private PropertiesCarouselService propertiesCarouselService;

    @GetMapping(value = "/position/{position}")
    public List<PropertiesCarouselPO> list(@PathVariable("position") Integer position) {
        return propertiesCarouselService.list(position);
    }
}
